h2. Installation

The gem is hosted on "RubyGems.org":http://rubygems.org/gems/formtastic ,  so *if you haven't already*, add it as a gem source:

<pre>
  sudo gem sources -a http://rubygems.org/
</pre>

Then install the Formtastic gem:

<pre>
  sudo gem install formtastic
</pre>

And add it to your environment.rb configuration as a gem dependency:

<pre>
  config.gem 'formtastic'
</pre>

<a name="css_generator"></a>
Optionally, run @./script/generate formtastic@ to copy the following files into your app:

* @config/initializers/formtastic.rb@ - a commented out Formtastic config initializer
* @public/stylesheets/formtastic.css@
* @public/stylesheets/formtastic_changes.css@

A proof-of-concept stylesheet is provided which you can include in your layout. Customization is best achieved by overriding these styles in an additional stylesheet so that the Formtastic styles can be updated without clobbering your changes. If you want to use these stylesheets, add both to your layout with this helper (implemented in version 0.98):

<pre>
  <head>
    ...
    <%= formtastic_stylesheet_link_tag %>
    ...
  </head>
</pre>

Formtastic version 0.97

<pre>
  <head>
    ...
    <%= stylesheet_link_tag 'my_css', 'formtastic', 'formtastic_changes' %>
    ...
  </head>
</pre>